Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adjust rollback_start_live update #811

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

gabriele-0201
Copy link
Contributor

When a rollback is going to erase all the commits,
rollback_start_live will need to be equal to pending_truncate.

Copy link
Contributor Author

gabriele-0201 commented Feb 13, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@@ -237,8 +237,9 @@ impl Rollback {

// NOTE: for now, if there is a pending truncate, we ignore everything else.
if let Some(pending_truncate) = pending_truncate {
let rollback_start_live = std::cmp::min(seglog.live_range().0 .0, pending_truncate);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the formatting here is a bit odd (same as before), but should be

seglog.live_range().0.0 without the extra space.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! I agree that formatting is weird, but it seems it is what the latest version of rustfmt wants. I disabled it and pushed without the extra space

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently this is not considered acceptable by rustfmt at all, as you can see in this action failure.

I will keep the weird extra space, otherwise we should use something like #[rustfmt::skip] but I don't think it is worth it!

@gabriele-0201 gabriele-0201 force-pushed the gm_torture_avoid_panic_in_workload_run branch from af7063e to a155287 Compare February 14, 2025 08:28
@gabriele-0201 gabriele-0201 force-pushed the gm_torture_rollback_open_panic branch from 3ab3af6 to 3f27ed4 Compare February 14, 2025 08:28
When a rollback is going to erase all the commits,
`rollback_start_live` will need to be equal to `pending_truncate`.
@gabriele-0201 gabriele-0201 force-pushed the gm_torture_rollback_open_panic branch from 3f27ed4 to d533eef Compare February 14, 2025 08:34
Base automatically changed from gm_torture_avoid_panic_in_workload_run to master February 14, 2025 09:04
@gabriele-0201 gabriele-0201 merged commit e36bfc5 into master Feb 14, 2025
8 checks passed
@gabriele-0201 gabriele-0201 deleted the gm_torture_rollback_open_panic branch February 14, 2025 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants